package net.kts.setting;

import net.kts.main.R;
import net.kts.setting.language.LanguageUtil;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.Menu;
import android.widget.TextView;

public class Setting extends Activity {
	private static final int EDIT_ID = Menu.FIRST+2;
	private static final int CLOSE_ID = Menu.FIRST+4;
	
	private TextView username=null;
	private TextView languagelist=null;
	private TextView checkbox=null;
//	private TextView ringtone=null;
//	private TextView checkbox2=null;

	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.setting);

		username=(TextView)findViewById(R.id.username);
		languagelist=(TextView)findViewById(R.id.languagelist);
		checkbox=(TextView)findViewById(R.id.checkbox);
//		ringtone=(TextView)findViewById(R.id.ringtone);
//		checkbox2=(TextView)findViewById(R.id.checkbox2);		
	}
	
	@Override
	public void onResume() {
		super.onResume();
		SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(this);
		username.setText(prefs.getString("username", "<unset>"));
		String lanquage = prefs.getString("languagelist", "<unset>");
		languagelist.setText(lanquage);
		LanguageUtil.updateLanguage(lanquage);
		checkbox.setText(new Boolean(prefs.getBoolean("checkbox", false))
												.toString());
	}
	
	// Menu
	
}
